package cn.edu.nju.software.buyer;


/**
* cn/edu/nju/software/buyer/SystemAPOA.java .
* �� IDL-to-Java ������������ֲ�����汾 "3.2" ���
* ���� buyerA.idl
* 2009��4��7�� ���ڶ� ����09ʱ31��16�� CST
*/

public abstract class SystemAPOA extends org.omg.PortableServer.Servant
 implements cn.edu.nju.software.buyer.SystemAOperations, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("getAddress", new java.lang.Integer (0));
    _methods.put ("goodsIssued", new java.lang.Integer (1));
    _methods.put ("dealSuccess", new java.lang.Integer (2));
  }

  public org.omg.CORBA.portable.OutputStream _invoke (String $method,
                                org.omg.CORBA.portable.InputStream in,
                                org.omg.CORBA.portable.ResponseHandler $rh)
  {
    org.omg.CORBA.portable.OutputStream out = null;
    java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
    if (__method == null)
      throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

    switch (__method.intValue ())
    {

  /*
  	��\
  		?SystemB(
  		??'0@��?z??10 11
  			
  	?p
  		orderNo ?U��
  		
  	?��
  		'0@
    */
       case 0:  // buyer/SystemA/getAddress
       {
         String orderNo = in.read_string ();
         String $result = null;
         $result = this.getAddress (orderNo);
         out = $rh.createReply();
         out.write_string ($result);
         break;
       }


  /*
  	��\
  		?SystemB(
  		?��??'��?z?? 12
  			
  	?p
  		orderNo ?U��
    */
       case 1:  // buyer/SystemA/goodsIssued
       {
         String orderNo = in.read_string ();
         this.goodsIssued (orderNo);
         out = $rh.createReply();
         break;
       }


  /*
  	��\
  		?SystemC(
  		?��?��?z??14
  			
  	?p
  		orderNo ?U��
    */
       case 2:  // buyer/SystemA/dealSuccess
       {
         String orderNo = in.read_string ();
         this.dealSuccess (orderNo);
         out = $rh.createReply();
         break;
       }

       default:
         throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:buyer/SystemA:1.0"};

  public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
  {
    return (String[])__ids.clone ();
  }

  public SystemA _this() 
  {
    return SystemAHelper.narrow(
    super._this_object());
  }

  public SystemA _this(org.omg.CORBA.ORB orb) 
  {
    return SystemAHelper.narrow(
    super._this_object(orb));
  }


} // class SystemAPOA
